package main

import (
	"fmt"
)

var num int

func main() {
	var in chan int = make(chan int, 100)
	var out chan int = make(chan int, 100)


	for i := 0; i <= 10; i++ {

		in <- i
	}


	for i := 0; i <= 10; i++ {

		go test(&in, &out)
	}



	for true {

		outval := <-out

		fmt.Println("outval : ", outval)
	}

}

func test(in *chan int, out *chan int) {

	for true {

		i := <-*in

		*out <- i
	}

}
